From ecb4c0e3fe119928e26084645e524f5840194504 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 12 May 2017 12:28:22 -0400 Subject: [PATCH] ParserOptions: Include wrapping class in options hash Avoids polluting the cache when things take advantage of the option. Bug: T165115 Bug: T165161 Change-Id: I5be25c6de68012df58b6a0cbf92e2f972be2b68a --- includes/parser/ParserOptions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index d4d104231d..d097414aff 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -493,6 +493,7 @@ class ParserOptions { * @return string|bool */ public function getWrapOutputClass() { + $this->optionUsed( 'wrapclass' ); return $this->wrapOutputClass; } @@ -943,6 +944,10 @@ class ParserOptions { $confstr .= '!printable=1'; } + if ( $this->wrapOutputClass !== 'mw-parser-output' && in_array( 'wrapclass', $forOptions ) ) { + $confstr .= '!wrapclass=' . $this->wrapOutputClass; + } + if ( $this->mExtraKey != '' ) { $confstr .= $this->mExtraKey; } -- 2.20.1